<?php
    function setForm( $getFormData )
    {
        return isset( $getFormData['nameRu'] );
    }
    
    function setSiteMenu()
    {
        $top['mangaTop'] = array(
            array( 'id' => 1, 'name' => 'One Piece' ),
            array( 'id' => 1, 'name' => 'Home Tutor Hitman Reborn!' ),
            array( 'id' => 1, 'name' => 'Fairy Tail' ),
            array( 'id' => 1, 'name' => 'Noblesse' ),
            array( 'id' => 1, 'name' => 'Air Gear' ),
            array( 'id' => 1, 'name' => 'Naruto' ),
            array( 'id' => 1, 'name' => 'Mahou Sensei Negima!' ),
            array( 'id' => 1, 'name' => 'Hunter X Hunter' ),
            array( 'id' => 1, 'name' => 'D. Gray­Man' ),
            array( 'id' => 1, 'name' => 'Beelzebub' )
        );

        return parseTemplate( 'menu', $top );
    }
    
    function setViewerVariant()
    {
        if ( $_GET['mini'] == 'true' )
        {
            $bigVariant  = '<a href="index.php?mini=false">больше</a>';
            $miniVariant = 'меньше';
        }
        else
        {
            $bigVariant  = 'больше';
            $miniVariant = '<a href="index.php?mini=true">меньше</a>';
        }
        return array(
            'bigVariant'  => $bigVariant,
            'miniVariant' => $miniVariant
        );
    }
    
    function printResultForAdmin( $msg )
    {
        global $adminMsg;
        $adminMsg = $msg;
    }
    
    function parseTag( $tags )
    {
        $tag = explode( ",", $tags );
        for ( $i = 0, $l = count( $tag ); $i < $l; $i++ )
        {
            $tag[$i] = trim( $tag[$i] );
        }
        return $tag;
    }
?>